<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    //Article 文章
    $router->resource('/article', ArticleController::class);
    //文章分类
    $router->resource('/articleClassify', ArticleClassifyController::class);
    //帮助中心
    $router->resource('/help', HelpController::class);
    //帮助中心分类
    $router->resource('/helpClassify', HelpClassifyController::class);

    //商家管理
    //商家申请管理
    $router->resource('/business/apply', BusinessApplyController::class);
    $router->post('/business/apply/handle/{id}/{status}','BusinessApplyController@handleApply');//status=2同意，3拒绝
    //商家管理
    $router->resource('/business', BusinessController::class);

    //客户管理
    $router->resource('/users', UserController::class);
    //工种管理
    $router->resource('/worktype', WorkTypeController::class);

    //工程管理
    $router->resource('/orders', OrderController::class);

    //启动页管理
    $router->resource('/startupLog', StartUpController::class);


});
